<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Travel Dream - Home</title>
	<link href="style.css" rel="stylesheet" type="text/css" />
</h:head>
<h:body>
<div id="maincontainer">
  <div id="menu">
    <div>
    	<ul style="display:block;list-style-type:none;">
    		<li><a href="home.xhtml">HOME</a></li>
    		<li><a href="search package.xhtml">RICERCA PACCHETTO</a></li>
    		<li><a href="search component.xhtml">RICERCA COMPONENTE</a></li>
    	</ul>
    </div>
  </div>
  <div id="right_column">
	<h:form>
	<p:panelGrid columns="3">
		<f:facet name="header">
			Inserisci Volo
		</f:facet>
		
		<h:outputLabel for="departureCity" value="Città di partenza: *" />
		<p:inputText id="departureCity" value="#{Flight.current.departureCity}" label="departureCity" />
		<p:message for="departureCity" />
		
		<h:outputLabel for="departureAirport" value="Aeroporto di partenza: *" />
		<p:inputText id="departureAirport" value="#{Flight.current.departureAirport}" label="departureAirport" />
		<p:message for="departureAirport" />
		
		<h:outputLabel for="arrivalCity" value="Città di arrivo *" />
		<p:inputText id="arrivalCity" value="#{Flight.current.arrivalCity}" label="arrivalCity" />
		<p:message for="arrivalCity" />
		
		<h:outputLabel for="arrivalAirport" value="Aeroporto di arrivo: *" />
		<p:inputText id="arrivalAirport" value="#{Flight.current.arrivalAirport}" label="arrivalAirport" />
		<p:message for="arrivalAirport" />
		
		<h:outputLabel for="departureDate" value="Data di partenza: *" />
		<p:calendar id="departureDate" value="#{Flight.current.departureDate}" mode="popup" label="departureDate" />
		<p:message for="departureDate" />
		
		<h:outputLabel for="seat" value="Posto: *" />
		<p:inputText id="seat" value="#{Flight.current.seat}" label="seat" />
		<p:message for="seat" />
		
		<h:outputLabel for="price" value="Prezzo: *" />
		<p:inputText id="price" value="#{Flight.current.price}" label="price" />
		<p:message for="price" />  
		
	</p:panelGrid>

	<h:commandButton value="Create" action="#{Flight.create()}" />
	</h:form>
</div>
</div>
</h:body>
</html>
